#include"Candidate.h"

Candidate::Candidate(string & str, int freq , int distance)
    :_sentence(str)
     ,_freq(freq)
     ,_dist(distance)
{}

bool operator<(const Candidate& lhs ,const Candidate& rhs)
{
    if(lhs._dist>rhs._dist)
    {
        return true;
    }
    else if(lhs._freq>rhs._freq)
    {
        return true;
    }
    return false;
}

ostream& operator<<(ostream& os ,const Candidate & rhs)
{
    os<<"{ "<<rhs._sentence<<"}\n";
    return os;
}
